<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录成功</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
            background: linear-gradient(135deg, #ff80bf, #9580ff);
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            color: white;
            text-align: center;
            overflow: hidden;
        }

        .success-container {
            background-color: rgba(255, 255, 255, 0.2);
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            max-width: 500px;
            width: 80%;
            backdrop-filter: blur(5px);
        }

        h1 {
            font-size: 2.5rem;
            margin-bottom: 20px;
            color: white;
        }

        p {
            font-size: 1.2rem;
            margin-bottom: 30px;
        }

        .countdown {
            font-size: 1rem;
            margin-top: 20px;
            color: rgba(255, 255, 255, 0.8);
        }

        .close-btn {
            background-color: white;
            color: #ff80bf;
            border: none;
            padding: 12px 25px;
            border-radius: 50px;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: bold;
            margin-top: 20px;
        }

        .close-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

        .checkmark {
            width: 80px;
            height: 80px;
            margin: 0 auto 20px;
            border-radius: 50%;
            display: block;
            stroke-width: 5;
            stroke: #fff;
            stroke-miterlimit: 10;
            animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
        }

        .checkmark__circle {
            stroke-dasharray: 166;
            stroke-dashoffset: 166;
            stroke-width: 5;
            stroke-miterlimit: 10;
            stroke: #fff;
            fill: none;
            animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
        }

        .checkmark__check {
            transform-origin: 50% 50%;
            stroke-dasharray: 48;
            stroke-dashoffset: 48;
            animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
        }

        @keyframes stroke {
            100% {
                stroke-dashoffset: 0;
            }
        }

        @keyframes scale {
            0%, 100% {
                transform: none;
            }
            50% {
                transform: scale3d(1.1, 1.1, 1);
            }
        }

        @keyframes fill {
            100% {
                box-shadow: inset 0px 0px 0px 80px rgba(255, 255, 255, 0);
            }
        }
    </style>
</head>
<body>
<div class="success-container">
    <svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
        <circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/>
        <path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
    </svg>
    <h1>操作成功！</h1>
    <p>您已成功操作完毕</p>
    <div class="countdown" id="countdown">3秒后自动关闭窗口...</div>
    <button class="close-btn" onclick="closeWindow()">立即关闭</button>
</div>

<script>
    // 倒计时功能
    let seconds = 3;
    const countdownElement = document.getElementById('countdown');

    const timer = setInterval(() => {
        seconds--;
        countdownElement.textContent = `${seconds}秒后自动关闭窗口...`;

        if (seconds <= 0) {
            clearInterval(timer);
            closeWindow();
        }
    }, 1000);

    // 关闭窗口函数
    function closeWindow() {
        // 尝试直接关闭
        try {
            window.close();
        } catch (e) {
            // 如果直接关闭失败，尝试其他方法
            try {
                window.open('', '_self').close();
            } catch (e) {
                // 如果还是失败，提示用户手动关闭
                countdownElement.textContent = "请手动关闭此窗口";
                document.querySelector('.close-btn').style.display = 'block';
            }
        }
    }
</script>
</body>
</html>